Acute LA Travellogic series API for LabVIEW
Overview
The
API consists of a number of "Call Function" blocks that access the
Labview API DLL "larunlv.dll"". This DLL wraps calls to two Acute
driver DLL called "laRun.dll" und "laWaveExt.dll". It performs
necessary data conversions,
i.e. for the _TRIG structure that can not be passed directy from
LabView.
Please see the example program LA_example.vi for reference. All "Call function nodes" and enum definitions are in "la_lib.vi".
Usage
The
Call function blocks must point to the DLL 'larunlv.dll'. Check the
path to this DLL in each Call function block you use, because the full
path is stored. Most likely you will use a different path than the path
we used. If the library is not found, you may create your own Shortcut to LabView and set the "Start in" directory to the location of the program and the DLLs.
The function names and the parameter for the
blocks are identical to those mentionend in the manual
'eLARunDll.pdf' that accompanies
the SDK example for Visual Studio (VC language). Use it as reference.
Some
parameters (i.e. nIndex) have predefined values. In LabView enum
controls are best used to cover these constants; please see the example
program.
For program flow we recommend not to rely on the
flow chart in eLARunDll.pdf. In our opinion only the method used
in the LA SDK in the Visual Studio example works. For that reason we used it in
the example program too. It affects the usage of GetHwInfo and
SetHwInfo that is not covered fully in the flow chart.
Reference
lvLaInit - Loads all neccessary libraries and initializes the Logic Analyzer
If the initialization fails, the return code explains the error:
0: uLaInit() (Initialization of the Logic Analyzer itself) failed
1: Success. Everything is OK
16: The file "larun.dll" was not found
17: The function "uLaInit" was not found in "larun.dll"
18: The function "ulaShutdown" was not found in "larun.dll"
19: The function "ulaThreshold" was not found in "larun.dll"
20: The function "ulaGetHwInfo" was not found in "larun.dll"
21: The function "ulaSetHwInfo" was not found in "larun.dll"
22: The function "ulaGetModelName" was not found in "larun.dll"
23: The function "ulaCapture" was not found in "larun.dll"
24: The function "ulaRead" was not found in "larun.dll"
32: The file "lawaveext.dll" was not found
33: The function "ulaUnmangle" was not found in "lawaveext.dll"
lvLaUnmangle - extracts the data of one channel out of the data block of read channels
These parameters must be passed:
- Source data array and size of the array in elements.
- Channel number to extract
- Target data array that will contain the data of one channel, and the size in elements.
- The "H/W mode" that was set in lvLaSetHwInfo.
On Return, the target data array contains the captured data points of one channel.
All other functions
return a "success" flag (boolean). 1 means success, 0 means failure.
Library versions
The API was developed using Program version 2.5.0.28. The version of "lvrun.dll" was 2.3.0.8.
For reference use the manual "eLARunDll.pdf" of the SDK LAVC in the subfolder LA_VC\Manual.
Example program
The
example program is ready to run. It requires a signal to be applied to
the logic analyzer to show some real data. Apply a TTL level signal of
1kHz between Pod/Input "0" and "GND".
In the program the sample rate
is set to 100kHz and the buffer length is 256. Each bit is converted to
a "00" or "01" and displayed. So you should see a series of "00" and
"01" as shown in the screen shot below representing a square wave.
For comparison a screenshot of the LA Viewer with same settings has been taken.
Take
care to set only valid combinations of "H/W mode", input channels,
sample rate and buffer length. In general checking your setting using
the LA Viewer, then deterining the H/W mode using the manual, before
using values in your program works best.
LabView screen shot

LA Viewer screenshot

Compatible hardware settings for example program in LA Viewer

Version
The version of this interface is 1.2 (05/2011).